#ifndef DOWNLOADITEMWIDGET_H
#define DOWNLOADITEMWIDGET_H

#include <QWidget>
#include <QEvent>
#include <QElapsedTimer>
namespace Ui {
class downloaditemwidget;
}
class downloaditemcontroller;

class downloaditemwidget : public QWidget
{
    Q_OBJECT

public:
    explicit downloaditemwidget(downloaditemcontroller *controller, QWidget *parent = nullptr);
    ~downloaditemwidget();
    downloaditemcontroller *controller;

protected:
    void enterEvent(QEnterEvent *event);                     //进入QWidget瞬间事件
    void leaveEvent(QEvent *);                               //离开QWidget瞬间事件
private:

    QElapsedTimer time;
    void updateWidget();
    void updateHistory();
    Ui::downloaditemwidget *ui;
private slots:
    void changeDeletedStyle();

};

#endif // DOWNLOADITEMWIDGET_H
